package asava.trees;

import asava.names.Name;

/**
 * @author Tim Richter
 */
public final class Var extends Tree {
    public int modifiers;
    public Name name;
    public Tree type;
    public Tree init;

    public Var(final int modifiers,
               final Name name,
               final Tree type,
               final Tree init) {
        this.modifiers = modifiers;
        this.name = name;
        this.type = type;
        this.init = init;
    }

    @Override
    public int kind() {
        return TreeKind.VAR;
    }

    @Override
    public void accept(final TreeVisitor visitor) {
        visitor.visit(this);
    }
}
